layui.use(['form', 'jquery', 'layer'], function(){
		var $=layui.jquery;
		var form=layui.form;
		var layer=layui.layer;
		// ajax		
		form.on("submit(demo1)",function(date){
				
			if($(".xin-pass").val()==$(".xin-password").val()){						
					$.ajax({
						method:"POST",
						url:"/my/updatepwd",
						data:date.field,					
						success:function(result){
							console.log(result);			
						}							
					})										
			}
			else{
				layer.msg("两次密码输入不一致请重新输入");
			}							
				return false;				
		})
		
})